<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function adder(num, count) {
      return num + count
    }
    adder(100, 5)
    adder(55, 5)
    adder(12, 5)
    adder(22, 8)
  </script>

  <script>
    function createAdder(count) {
      function adder(num) {
        return count + num
      }
      return adder
    }
    var adder5 = createAdder(5)
    adder5(100)
    adder5(55)
    adder5(12)

    var adder8 = createAdder(8)
    adder8(22)
    
    console.log(adder8(32))

  </script>

</body>

</html>